.class public Lcom/ninesky/browser/HistoryActivity;
.super Landroid/app/Activity;


# instance fields
.field private final a:Z

.field private b:Landroid/widget/ExpandableListView;

.field private c:Lcom/ninesky/browser/bu;

.field private d:Z

.field private e:Landroid/view/View;

.field private f:Ljava/lang/String;

.field private g:Ljava/lang/String;

.field private h:Landroid/database/Cursor;

.field private i:Landroid/widget/Button;

.field private j:Z

.field private k:Landroid/widget/AdapterView$OnItemLongClickListener;

.field private final l:Lcom/ninesky/browser/ei;

.field private m:I


# direct methods
.method public constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    iput-boolean v0, p0, Lcom/ninesky/browser/HistoryActivity;->a:Z

    iput-boolean v0, p0, Lcom/ninesky/browser/HistoryActivity;->j:Z

    new-instance v0, Lcom/ninesky/browser/cf;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/cf;-><init>(Lcom/ninesky/browser/HistoryActivity;)V

    iput-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->k:Landroid/widget/AdapterView$OnItemLongClickListener;

    new-instance v0, Lcom/ninesky/browser/ei;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/ei;-><init>(Lcom/ninesky/browser/HistoryActivity;)V

    iput-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->l:Lcom/ninesky/browser/ei;

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/HistoryActivity;)Landroid/widget/ExpandableListView;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    return-object v0
.end method

.method private a(ILandroid/content/Intent;)V
    .locals 0

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->getParent()Landroid/app/Activity;

    move-result-object p0

    check-cast p0, Lcom/ninesky/browser/BookmarkHistoryActivity;

    invoke-virtual {p0, p1, p2}, Lcom/ninesky/browser/BookmarkHistoryActivity;->a(ILandroid/content/Intent;)V

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/HistoryActivity;I)V
    .locals 4

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string v2, "id"

    invoke-virtual {v1, v2, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string v2, "displayorder"

    iget v3, p0, Lcom/ninesky/browser/HistoryActivity;->m:I

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    invoke-virtual {v0, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    const/4 v1, -0x1

    invoke-direct {p0, v1, v0}, Lcom/ninesky/browser/HistoryActivity;->a(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->finish()V

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/HistoryActivity;Landroid/database/Cursor;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/HistoryActivity;->h:Landroid/database/Cursor;

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/HistoryActivity;Landroid/view/View;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/HistoryActivity;->e:Landroid/view/View;

    return-void
.end method

.method static synthetic a(Lcom/ninesky/browser/HistoryActivity;Ljava/lang/String;Z)V
    .locals 4

    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    invoke-virtual {v0, p1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    if-eqz p2, :cond_0

    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string v2, "new_window"

    const/4 v3, 0x1

    invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    invoke-virtual {v0, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    :cond_0
    const/4 v1, -0x1

    invoke-direct {p0, v1, v0}, Lcom/ninesky/browser/HistoryActivity;->a(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->finish()V

    return-void
.end method

.method static synthetic b(Lcom/ninesky/browser/HistoryActivity;)Lcom/ninesky/browser/bu;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->c:Lcom/ninesky/browser/bu;

    return-object v0
.end method

.method static synthetic c(Lcom/ninesky/browser/HistoryActivity;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/ninesky/browser/HistoryActivity;->j:Z

    return v0
.end method

.method static synthetic d(Lcom/ninesky/browser/HistoryActivity;)V
    .locals 1

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-static {v0}, Lcom/ninesky/browser/provider/e;->b(Landroid/content/ContentResolver;)V

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->c:Lcom/ninesky/browser/bu;

    invoke-virtual {v0}, Lcom/ninesky/browser/bu;->b()V

    invoke-static {}, Lcom/ninesky/browser/BrowserActivity;->q()V

    return-void
.end method

.method static synthetic e(Lcom/ninesky/browser/HistoryActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->f:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic f(Lcom/ninesky/browser/HistoryActivity;)Landroid/database/Cursor;
    .locals 1

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->h:Landroid/database/Cursor;

    return-object v0
.end method


# virtual methods
.method final a(Landroid/database/Cursor;)V
    .locals 2

    invoke-interface {p1}, Landroid/database/Cursor;->getCount()I

    move-result v0

    if-lez v0, :cond_0

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->i:Landroid/widget/Button;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->i:Landroid/widget/Button;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    goto :goto_0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 8

    const/4 v4, 0x0

    const/16 v7, 0x8

    const/4 v6, 0x0

    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f070138

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/HistoryActivity;->setTitle(I)V

    sget-object v1, Lcom/ninesky/browser/provider/e;->a:Landroid/net/Uri;

    sget-object v2, Lcom/ninesky/browser/provider/e;->b:[Ljava/lang/String;

    const-string v3, "visits > 0 AND date > 0"

    const-string v5, "date DESC"

    move-object v0, p0

    invoke-virtual/range {v0 .. v5}, Lcom/ninesky/browser/HistoryActivity;->managedQuery(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    iput-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->h:Landroid/database/Cursor;

    new-instance v0, Lcom/ninesky/browser/bu;

    iget-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->h:Landroid/database/Cursor;

    invoke-direct {v0, p0, p0, v1}, Lcom/ninesky/browser/bu;-><init>(Lcom/ninesky/browser/HistoryActivity;Landroid/content/Context;Landroid/database/Cursor;)V

    iput-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->c:Lcom/ninesky/browser/bu;

    const v0, 0x7f03000f

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/HistoryActivity;->setContentView(I)V

    const v0, 0x7f0c0010

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/HistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ExpandableListView;

    iput-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    const v0, 0x7f0c0011

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/HistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    invoke-virtual {v1, v0}, Landroid/widget/ExpandableListView;->setEmptyView(Landroid/view/View;)V

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    iget-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->c:Lcom/ninesky/browser/bu;

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setAdapter(Landroid/widget/ExpandableListAdapter;)V

    iget-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    new-instance v1, Lcom/ninesky/browser/cd;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/cd;-><init>(Lcom/ninesky/browser/HistoryActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/ExpandableListView;->setOnChildClickListener(Landroid/widget/ExpandableListView$OnChildClickListener;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "definedQuickBookMark"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_0

    const-string v1, "definedQuickBookMark"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "definedQuickBookMark"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/ninesky/browser/HistoryActivity;->j:Z

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_0

    const-string v1, "displayorder"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Lcom/ninesky/browser/HistoryActivity;->m:I

    :cond_0
    const v0, 0x7f0c002b

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/HistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/ninesky/browser/HistoryActivity;->i:Landroid/widget/Button;

    const v0, 0x7f0c0012

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/HistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    const v1, 0x7f0c000a

    invoke-virtual {p0, v1}, Lcom/ninesky/browser/HistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iget-boolean v2, p0, Lcom/ninesky/browser/HistoryActivity;->j:Z

    if-eqz v2, :cond_1

    iget-object v2, p0, Lcom/ninesky/browser/HistoryActivity;->i:Landroid/widget/Button;

    invoke-virtual {v2, v7}, Landroid/widget/Button;->setVisibility(I)V

    invoke-virtual {v0, v7}, Landroid/widget/Button;->setVisibility(I)V

    invoke-virtual {v1, v6}, Landroid/widget/Button;->setVisibility(I)V

    :cond_1
    iget-boolean v2, p0, Lcom/ninesky/browser/HistoryActivity;->j:Z

    if-nez v2, :cond_2

    iget-object v2, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    iget-object v3, p0, Lcom/ninesky/browser/HistoryActivity;->k:Landroid/widget/AdapterView$OnItemLongClickListener;

    invoke-virtual {v2, v3}, Landroid/widget/ExpandableListView;->setOnItemLongClickListener(Landroid/widget/AdapterView$OnItemLongClickListener;)V

    :cond_2
    iget-object v2, p0, Lcom/ninesky/browser/HistoryActivity;->b:Landroid/widget/ExpandableListView;

    invoke-virtual {v2, p0}, Landroid/widget/ExpandableListView;->setOnCreateContextMenuListener(Landroid/view/View$OnCreateContextMenuListener;)V

    invoke-virtual {v2}, Landroid/widget/ExpandableListView;->getExpandableListAdapter()Landroid/widget/ExpandableListAdapter;

    move-result-object v3

    invoke-interface {v3}, Landroid/widget/ExpandableListAdapter;->getGroupCount()I

    move-result v3

    if-lez v3, :cond_3

    new-instance v3, Lcom/ninesky/browser/ce;

    invoke-direct {v3, p0, v2}, Lcom/ninesky/browser/ce;-><init>(Lcom/ninesky/browser/HistoryActivity;Landroid/widget/ExpandableListView;)V

    invoke-virtual {v2, v3}, Landroid/widget/ExpandableListView;->post(Ljava/lang/Runnable;)Z

    :cond_3
    iget-object v2, p0, Lcom/ninesky/browser/HistoryActivity;->h:Landroid/database/Cursor;

    invoke-virtual {p0, v2}, Lcom/ninesky/browser/HistoryActivity;->a(Landroid/database/Cursor;)V

    new-instance v2, Lcom/ninesky/browser/cb;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/cb;-><init>(Lcom/ninesky/browser/HistoryActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->i:Landroid/widget/Button;

    new-instance v2, Lcom/ninesky/browser/cc;

    invoke-direct {v2, p0}, Lcom/ninesky/browser/cc;-><init>(Lcom/ninesky/browser/HistoryActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    new-instance v1, Lcom/ninesky/browser/bx;

    invoke-direct {v1, p0}, Lcom/ninesky/browser/bx;-><init>(Lcom/ninesky/browser/HistoryActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "disable_new_window"

    invoke-virtual {v0, v1, v6}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    iput-boolean v0, p0, Lcom/ninesky/browser/HistoryActivity;->d:Z

    invoke-static {}, Lcom/ninesky/browser/BookmarkHistoryActivity;->a()Lcom/ninesky/browser/az;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->l:Lcom/ninesky/browser/ei;

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/az;->a(Landroid/webkit/WebIconDatabase$IconListener;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->getParent()Landroid/app/Activity;

    move-result-object v0

    if-eqz v0, :cond_4

    instance-of v0, v0, Lcom/ninesky/browser/BookmarkHistoryActivity;

    if-nez v0, :cond_5

    :cond_4
    new-instance v0, Ljava/lang/AssertionError;

    const-string v1, "history page can only be viewed as a tabin CombinedBookmarkHistoryActivity"

    invoke-direct {v0, v1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V

    throw v0

    :cond_5
    invoke-direct {p0, v6, v4}, Lcom/ninesky/browser/HistoryActivity;->a(ILandroid/content/Intent;)V

    return-void
.end method

.method public onCreateContextMenu(Landroid/view/ContextMenu;Landroid/view/View;Landroid/view/ContextMenu$ContextMenuInfo;)V
    .locals 5

    move-object v0, p3

    check-cast v0, Landroid/widget/ExpandableListView$ExpandableListContextMenuInfo;

    move-object v1, v0

    iget-object v2, v1, Landroid/widget/ExpandableListView$ExpandableListContextMenuInfo;->targetView:Landroid/view/View;

    instance-of v2, v2, Lcom/ninesky/browser/view/aa;

    if-nez v2, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v1, v1, Landroid/widget/ExpandableListView$ExpandableListContextMenuInfo;->targetView:Landroid/view/View;

    check-cast v1, Lcom/ninesky/browser/view/aa;

    invoke-virtual {v1}, Lcom/ninesky/browser/view/aa;->b()Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/ninesky/browser/HistoryActivity;->f:Ljava/lang/String;

    invoke-virtual {v1}, Lcom/ninesky/browser/view/aa;->a()Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->g:Ljava/lang/String;

    new-instance v1, Lcom/ninesky/widget/l;

    invoke-direct {v1, p0}, Lcom/ninesky/widget/l;-><init>(Landroid/content/Context;)V

    iget-boolean v2, p0, Lcom/ninesky/browser/HistoryActivity;->d:Z

    if-nez v2, :cond_1

    const v2, 0x7f020059

    const v3, 0x7f0700ba

    new-instance v4, Lcom/ninesky/browser/bw;

    invoke-direct {v4, p0, v1}, Lcom/ninesky/browser/bw;-><init>(Lcom/ninesky/browser/HistoryActivity;Lcom/ninesky/widget/l;)V

    invoke-virtual {v1, v2, v3, v4}, Lcom/ninesky/widget/l;->a(IILandroid/view/View$OnClickListener;)Landroid/view/View;

    :cond_1
    invoke-virtual {p0}, Lcom/ninesky/browser/HistoryActivity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    new-instance v3, Landroid/content/Intent;

    const-string v4, "android.intent.action.SEND"

    invoke-direct {v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v4, "text/plain"

    invoke-virtual {v3, v4}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    const/high16 v4, 0x1

    invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->resolveActivity(Landroid/content/Intent;I)Landroid/content/pm/ResolveInfo;

    move-result-object v2

    if-eqz v2, :cond_2

    const v2, 0x7f020067

    const v3, 0x7f0700d1

    new-instance v4, Lcom/ninesky/browser/bz;

    invoke-direct {v4, p0, v1}, Lcom/ninesky/browser/bz;-><init>(Lcom/ninesky/browser/HistoryActivity;Lcom/ninesky/widget/l;)V

    invoke-virtual {v1, v2, v3, v4}, Lcom/ninesky/widget/l;->a(IILandroid/view/View$OnClickListener;)Landroid/view/View;

    :cond_2
    const v2, 0x7f020045

    const v3, 0x7f0700d3

    new-instance v4, Lcom/ninesky/browser/by;

    invoke-direct {v4, p0, v1}, Lcom/ninesky/browser/by;-><init>(Lcom/ninesky/browser/HistoryActivity;Lcom/ninesky/widget/l;)V

    invoke-virtual {v1, v2, v3, v4}, Lcom/ninesky/widget/l;->a(IILandroid/view/View$OnClickListener;)Landroid/view/View;

    const v2, 0x7f020046

    const v3, 0x7f070009

    new-instance v4, Lcom/ninesky/browser/r;

    invoke-direct {v4, p0, v1}, Lcom/ninesky/browser/r;-><init>(Lcom/ninesky/browser/HistoryActivity;Lcom/ninesky/widget/l;)V

    invoke-virtual {v1, v2, v3, v4}, Lcom/ninesky/widget/l;->a(IILandroid/view/View$OnClickListener;)Landroid/view/View;

    iget-boolean v2, p0, Lcom/ninesky/browser/HistoryActivity;->j:Z

    if-nez v2, :cond_3

    iget-object v2, p0, Lcom/ninesky/browser/HistoryActivity;->e:Landroid/view/View;

    invoke-virtual {v1, v2}, Lcom/ninesky/widget/l;->b(Landroid/view/View;)V

    :cond_3
    invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onCreateContextMenu(Landroid/view/ContextMenu;Landroid/view/View;Landroid/view/ContextMenu$ContextMenuInfo;)V

    goto :goto_0
.end method

.method protected onDestroy()V
    .locals 2

    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    invoke-static {}, Lcom/ninesky/browser/BookmarkHistoryActivity;->a()Lcom/ninesky/browser/az;

    move-result-object v0

    iget-object v1, p0, Lcom/ninesky/browser/HistoryActivity;->l:Lcom/ninesky/browser/ei;

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/az;->b(Landroid/webkit/WebIconDatabase$IconListener;)V

    return-void
.end method

.method protected onPause()V
    .locals 0

    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    invoke-static {p0}, Lcom/mobclick/android/c;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 0

    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    invoke-static {p0}, Lcom/mobclick/android/c;->b(Landroid/content/Context;)V

    return-void
.end method
